package com.zdb.demo.design.pattern.creational.builder.v2;

public class Course {
    private String courseName;
    private String coursePPT;
    private String courseArticle;
    private String courseVideo;
    private String courseQA;


    public static class CourseBuilder {
        Course course = null;

        public CourseBuilder() {
            course = new Course();
        }

        public CourseBuilder buildCourseName(String courseName) {
            course.courseName = courseName;
            return this;
        }

        public CourseBuilder buildCoursePPT(String coursePPT) {
            course.coursePPT = coursePPT;
            return this;
        }

        public CourseBuilder buildCourseArticle(String courseArticle) {
            course.courseArticle = courseArticle;
            return this;
        }

        public CourseBuilder buildCourseVideo(String courseVideo) {
            course.courseVideo = courseVideo;
            return this;
        }

        public CourseBuilder buildCourseQA(String courseQA) {
            course.courseQA = (courseQA);
            return this;
        }

        public Course makeCourse() {
            return course;
        }
    }

    @Override
    public String toString() {
        return "Course{" +
                "courseName='" + courseName + '\'' +
                ", coursePPT='" + coursePPT + '\'' +
                ", courseArticle='" + courseArticle + '\'' +
                ", courseVideo='" + courseVideo + '\'' +
                ", courseQA='" + courseQA + '\'' +
                '}';
    }
}
